package com.xpertline.ui.customer;

import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JButton;
import java.awt.GridLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Dimension;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
import javax.swing.JTextArea;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;

public class EditCustomerDialog extends JDialog {
	private JTable table;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;
	private JTextField textField_7;
	private JTextField textField_8;
	private JTextField textField_9;
	private JTextField textField_10;
	private JTextField textField_11;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					EditCustomerDialog dialog = new EditCustomerDialog();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the dialog.
	 */
	public EditCustomerDialog() {
		setBounds(100, 100, 791, 508);
		
		JPanel buttonPane = new JPanel();
		getContentPane().add(buttonPane, BorderLayout.NORTH);
		GridBagLayout gbl_buttonPane = new GridBagLayout();
		gbl_buttonPane.columnWidths = new int[]{404, 406, 0};
		gbl_buttonPane.rowHeights = new int[]{33, 0};
		gbl_buttonPane.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
		gbl_buttonPane.rowWeights = new double[]{0.0, Double.MIN_VALUE};
		buttonPane.setLayout(gbl_buttonPane);
		
		JPanel rightPanel = new JPanel();
		FlowLayout flowLayout_1 = (FlowLayout) rightPanel.getLayout();
		flowLayout_1.setAlignment(FlowLayout.RIGHT);
		GridBagConstraints gbc_rightPanel = new GridBagConstraints();
		gbc_rightPanel.fill = GridBagConstraints.BOTH;
		gbc_rightPanel.gridx = 1;
		gbc_rightPanel.gridy = 0;
		buttonPane.add(rightPanel, gbc_rightPanel);
		
		JButton btnNewButton_2 = new JButton("X\u00F3a");
		btnNewButton_2.setPreferredSize(new Dimension(90, 25));
		rightPanel.add(btnNewButton_2);
		
		JButton btnNewButton_1 = new JButton("H\u1EE7y");
		btnNewButton_1.setPreferredSize(new Dimension(90, 25));
		rightPanel.add(btnNewButton_1);
		
		JButton btnNewButton = new JButton("L\u01B0u l\u1EA1i");
		btnNewButton.setPreferredSize(new Dimension(90, 25));
		rightPanel.add(btnNewButton);
		
		JPanel leftPanel = new JPanel();
		FlowLayout flowLayout = (FlowLayout) leftPanel.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbc_leftPanel = new GridBagConstraints();
		gbc_leftPanel.insets = new Insets(0, 0, 0, 5);
		gbc_leftPanel.fill = GridBagConstraints.BOTH;
		gbc_leftPanel.gridx = 0;
		gbc_leftPanel.gridy = 0;
		buttonPane.add(leftPanel, gbc_leftPanel);
		
		JButton button = new JButton("|<");
		button.setPreferredSize(new Dimension(90, 25));
		leftPanel.add(button);
		
		JButton button_1 = new JButton("<");
		button_1.setPreferredSize(new Dimension(90, 25));
		leftPanel.add(button_1);
		
		JButton button_2 = new JButton(">");
		button_2.setPreferredSize(new Dimension(90, 25));
		leftPanel.add(button_2);
		
		JButton button_3 = new JButton(">|");
		button_3.setPreferredSize(new Dimension(90, 25));
		leftPanel.add(button_3);
		
		JScrollPane scrollPane = new JScrollPane();
		getContentPane().add(scrollPane, BorderLayout.EAST);
		
		table = new JTable();
		table.setPreferredScrollableViewportSize(new Dimension(400, 350));
		table.setRowHeight(20);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
				{null, null, null},
			},
			new String[] {
				"Ng\u00E0y \u0111\u1EBFn", "Ph\u00F2ng", "T\u1ED5ng ti\u1EC1n"
			}
		) {
			Class[] columnTypes = new Class[] {
				String.class, String.class, Double.class
			};
			public Class getColumnClass(int columnIndex) {
				return columnTypes[columnIndex];
			}
		});
		scrollPane.setViewportView(table);
		
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.CENTER);
		
		JLabel lblMKhchHng = new JLabel("M\u00E3 kh\u00E1ch h\u00E0ng");
		
		JLabel lblTnKhchHng = new JLabel("T\u00EAn kh\u00E1ch h\u00E0ng");
		
		JLabel lblMVch = new JLabel("M\u00E3 v\u1EA1ch");
		
		JLabel lblaCh = new JLabel("\u0110\u1ECBa ch\u1EC9");
		
		textField = new JTextField();
		textField.setColumns(20);
		
		textField_1 = new JTextField();
		textField_1.setColumns(20);
		
		textField_2 = new JTextField();
		textField_2.setColumns(20);
		
		JTextArea textArea = new JTextArea();
		textArea.setColumns(20);
		textArea.setRows(2);
		
		JLabel lblinThoi = new JLabel("\u0110i\u1EC7n tho\u1EA1i");
		
		textField_3 = new JTextField();
		textField_3.setColumns(20);
		
		JLabel lblDing = new JLabel("Di \u0111\u1ED9ng");
		
		textField_4 = new JTextField();
		textField_4.setColumns(20);
		
		JLabel lblNgynu = new JLabel("Ng\u00E0y \u0111\u1EBFn \u0111\u1EA7u ti\u00EAn");
		
		textField_5 = new JTextField();
		textField_5.setColumns(20);
		
		JLabel lblSLnn = new JLabel("S\u1ED1 l\u1EA7n \u0111\u1EBFn");
		
		textField_6 = new JTextField();
		textField_6.setColumns(20);
		
		JLabel lblTngTinTch = new JLabel("T\u1ED5ng ti\u1EC1n t\u00EDch l\u0169y");
		
		textField_7 = new JTextField();
		textField_7.setColumns(20);
		
		JLabel lblTngTinTrung = new JLabel("T\u1ED5ng ti\u1EC1n trung b\u00ECnh");
		
		textField_8 = new JTextField();
		textField_8.setColumns(20);
		
		JLabel lblimTchLy = new JLabel("\u0110i\u1EC3m t\u00EDch l\u0169y");
		
		JLabel lblimSDng = new JLabel("\u0110i\u1EC3m s\u1EED d\u1EE5ng");
		
		JLabel lblimCnLi = new JLabel("\u0110i\u1EC3m c\u00F2n l\u1EA1i");
		
		textField_9 = new JTextField();
		textField_9.setColumns(20);
		
		textField_10 = new JTextField();
		textField_10.setColumns(20);
		
		textField_11 = new JTextField();
		textField_11.setColumns(20);
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addGap(10)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(lblMKhchHng, Alignment.TRAILING)
						.addComponent(lblTnKhchHng, Alignment.TRAILING)
						.addComponent(lblMVch, Alignment.TRAILING)
						.addComponent(lblaCh, Alignment.TRAILING)
						.addComponent(lblinThoi, Alignment.TRAILING)
						.addComponent(lblDing, Alignment.TRAILING)
						.addComponent(lblNgynu, Alignment.TRAILING)
						.addComponent(lblSLnn, Alignment.TRAILING)
						.addComponent(lblTngTinTch, Alignment.TRAILING)
						.addComponent(lblTngTinTrung, Alignment.TRAILING)
						.addComponent(lblimTchLy, Alignment.TRAILING)
						.addComponent(lblimSDng, Alignment.TRAILING)
						.addComponent(lblimCnLi, Alignment.TRAILING))
					.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_9, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_11, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addContainerGap(81, Short.MAX_VALUE))
		);
		gl_panel.setVerticalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblMKhchHng)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblTnKhchHng)
						.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblMVch)
						.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblaCh)
						.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblinThoi)
						.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblDing)
						.addComponent(textField_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNgynu)
						.addComponent(textField_5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblSLnn)
						.addComponent(textField_6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblTngTinTch)
						.addComponent(textField_7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblTngTinTrung)
						.addComponent(textField_8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblimTchLy)
						.addComponent(textField_9, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblimSDng)
						.addComponent(textField_10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblimCnLi)
						.addComponent(textField_11, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addContainerGap(48, Short.MAX_VALUE))
		);
		panel.setLayout(gl_panel);

	}
}
